package com.vone.export.until;

import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFFont;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Font;

import com.vone.export.ExportUntil;

public class ExcelStyleHight {
	
	private  CellStyle cellStyleheader =null;//行内样式
	private  Font font = null;//字体
	private short shortsize=12;//字体大小
	HSSFWorkbook wb = (HSSFWorkbook) ExportUntil.workbook;

	public ExcelStyleHight() {
		super();
		//构建标题样式
		HSSFCellStyle tableCellStyle = wb.createCellStyle();
		this.cellStyleheader=ExportUntil.workbook.createCellStyle();
		this.font=ExportUntil.workbook.createFont();
		this.font.setFontHeightInPoints(shortsize);
		cellStyleheader.setWrapText(true);//自动换行
		cellStyleheader.setAlignment(CellStyle.ALIGN_LEFT);
		cellStyleheader.setVerticalAlignment(CellStyle.ALIGN_LEFT);
		cellStyleheader.setFont(font);
		HSSFFont tableFont = wb.createFont();//构建字体
		tableFont.setFontName("宋体");//设置字体
		tableFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);//设置粗体
		tableFont.setFontHeightInPoints((short) 12);//设置字体大小
		tableCellStyle.setFont(tableFont);//应用到样式
		
	}
	
	public CellStyle getCellStyleheader() {
		return cellStyleheader;
	}
	public void setCellStyleheader(CellStyle cellStyleheader) {
		this.cellStyleheader = cellStyleheader;
	}
	public Font getFont() {
		return font;
	}
	public void setFont(Font font) {
		this.font = font;
	}
	public short getShortsize() {
		return shortsize;
	}
	public void setShortsize(short shortsize) {
		this.shortsize = shortsize;
	}
	
}
